package Day40;

import java.util.Scanner;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-11-11
 * Time: 15:39
 * To BE A Better Person-2020-3-2
 */
public class TestDemo1 {
    private static int fun(int num){
        if(num == 1){
            return 0;
        }else if(num == 2){
            return 1;
        }else {
            return fun(num-1)+fun(num-2);
        }
    }
    public static void main(String[] args) {
        //hh
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){

            int num=sc.nextInt();
            int ans=0;
            if(num == 1){
                System.out.println(0);
            }else if(num == 2){
                System.out.println(1);
            }else{
                ans=(num-1)*fun(num);
                System.out.println(ans);
            }
        }
    }
}
